﻿using System;
using System.Html.DOM;
using System.Html.DOM.CSS;

namespace RexToy.UI.Controls
{
    public class DomNodeCreateOptions
    {
        [ImportMember("$name")]
        public string hashName;

        public string className;
        public string innerHTML;
        public Tag tag;
        public string src;
        public string href;
        public string title;
        public string placeholder;
        public object value;
        public InputType type;

        public string cellPadding;
        public string cellSpacing;
        public string border;

        public DomNodeCreateOptions[] items;
    }

    public class DomNode
    {
        public static DomNode Create(DomNodeCreateOptions options)
        {
            return null;
        }

        public HtmlElement _element;

        private DomNode __parent;
        public DomNode Parent
        {
            get { return __parent; }
            set { __parent = value; }
        }

        public DomNode(HtmlElement domElement)
        {
        }

        public void AppendChild(DomNode newDomNode)
        {
        }

        public void RemoveChild(DomNode childNode)
        {
        }

        public void InsertChildAt(DomNode childNode, uint idx)
        {
        }

        public DomNode[] GetChildren()
        {
            return null;
        }

        public void ClearChildren()
        {
        }

        public void SetAttribute(string name, object val)
        {
        }

        public string GetAttribute(string name)
        {
            return null;
        }

        public Style GetStyle()
        {
            return null;
        }

        public DomNode AttachEvent(DomEvent evType, Delegate dg)
        {
            return this;
        }

        public DomNode DetachEvent(DomEvent evType, Delegate dg)
        {
            return this;
        }

        public void AppendClass(string cssClassName)
        {
        }

        public void RemoveClass(string cssClassName)
        {
        }

        public void ReplaceClass(string oldClassName, string newClassName)
        {
        }

        [ImportMember("$")]
        public DomNode SearchByName(string name)
        {
            return null;
        }

        public int GetAbsoluteX()
        {
            return 0;
        }

        public int GetAbsoluteY()
        {
            return 0;
        }

        public int Width { get; set; }
        public int Height { get; set; }
    }
}
